﻿@namespace Blazorise
@inherits BaseComponent
@if ( Link is not null )
{
    <a @ref="@ElementRef" id="@ElementId" href="@Link" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
        @ChildContent
        @if ( Closable )
        {
            <span class="@CloseClassBuilder.Class" aria-label="Close" tabindex="0" @onclick="@OnCloseClickedHandler" @onclick:preventDefault @onkeydown="@OnCloseKeyDownHandler">
                <span aria-hidden="true">&times;</span>
            </span>
        }
    </a>
}
else
{
    <span @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
        @ChildContent
        @if ( Closable )
        {
            <span class="@CloseClassBuilder.Class" aria-label="Close" tabindex="0" @onclick="@OnCloseClickedHandler" @onclick:preventDefault @onkeydown="@OnCloseKeyDownHandler">
                <span aria-hidden="true">&times;</span>
            </span>
        }
    </span>
}